package com.haoliang.spring.component.lifecycle.bean;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 * @Author zhaohaoliang
 * @Date 创建于 下午5:58 2019/3/10
 * @Description 请输入类的描述信息
 */
@Component
public class CartBean implements InitializingBean,DisposableBean {

    public CartBean() {
    }

    public void destroy() throws Exception {
        System.out.println("cart销毁方法");
    }

    public void afterPropertiesSet() throws Exception {
        System.out.println("cart初始化方法");
    }
}
